package org.dromara.business.modules.services.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.business.modules.services.domain.BuServices;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.sensitive.annotation.Sensitive;
import org.dromara.common.sensitive.core.SensitiveStrategy;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;



/**
 * 服务信息视图对象 bu_services
 *
 * @author ckk
 * @date 2025-10-20
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BuServices.class)
public class BuServicesVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 服务ID
     */
    @ExcelProperty(value = "服务ID")
    private Long id;

    /**
     * 服务标题
     */
    @ExcelProperty(value = "服务标题")
    private String title;

    /**
     * 服务分类ID
     */
    @ExcelProperty(value = "服务分类ID", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "xqfl")
    private Long categoryId;

    /**
     * 服务简介（一句话）
     */
    @ExcelProperty(value = "服务简介", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "一=句话")
    private String intro;

    /**
     * 服务详细内容
     */
    @ExcelProperty(value = "服务详细内容")
    private String content;

    /**
     * 服务价格
     */
    @ExcelProperty(value = "服务价格")
    private BigDecimal price;

    /**
     * 价格是否面议：0-否，1-是
     */
    @ExcelProperty(value = "价格是否面议：0-否，1-是")
    private Integer priceNegotiable;

    /**
     * 服务图片
     */
    private String pics;

    /**
     * 服务图片
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "pics")
    private String picsUrl;

    /**
     * 服务地区
     */
    @ExcelProperty(value = "服务地区")
    private String location;

    /**
     * 联系人姓名
     */
    @ExcelProperty(value = "联系人姓名")
    @Sensitive(strategy = SensitiveStrategy.CHINESE_NAME, roleKey = "admin")
    private String contactName;

    /**
     * 联系电话
     */
    @ExcelProperty(value = "联系电话")
    @Sensitive(strategy = SensitiveStrategy.PHONE, roleKey = "admin")
    private String contactPhone;

    /**
     * 状态：0-已发布，1-待审核，2-已下架
     */
    @ExcelProperty(value = "状态：0-已发布，1-待审核，2-已下架")
    private Integer status;

    /**
     * 浏览次数
     */
    @ExcelProperty(value = "浏览次数")
    private Integer viewCount;

    /**
     * 咨询次数
     */
    @ExcelProperty(value = "咨询次数")
    private Integer inquiryCount;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 驳回原因
     */
    private String reason;

}
